import '../base_model.dart';

/// 基础实体
class UserTokenModel extends BaseModel {
  String token;
  String openid;
  int isInvite;
  int isDevice;

  UserTokenModel.fromJson(Map<String, dynamic> data) : super.fromJson(data) {
    token = data['token'];
    openid = data['openid'];
    isInvite = data['is_invite'] ?? 0;
    isDevice = data['is_device'] ?? 0;
  }

  @override
  Map<String, dynamic> toJson() {
    return {
      'token': token,
      'openid': openid,
      'isInvite': isInvite,
      'isDevice': isDevice
    };
  }
}
